package com.yunke.entity.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

/**
 * 系统配置数据传输对象
 * 
 * @author yunke
 * @since 1.0.0
 */
@Data
@Schema(name = "YunkeConfigDto", description = "系统配置数据传输对象")
public class YunkeConfigDto {

    @Schema(description = "配置ID")
    private Long id;

    @NotBlank(message = "配置键名不能为空")
    @Size(max = 100, message = "配置键名不能超过100个字符")
    @Schema(description = "配置键名")
    private String configKey;

    @NotBlank(message = "配置值不能为空")
    @Size(max = 2000, message = "配置值不能超过2000个字符")
    @Schema(description = "配置值")
    private String configValue;

    @NotBlank(message = "配置名称不能为空")
    @Size(max = 100, message = "配置名称不能超过100个字符")
    @Schema(description = "配置名称")
    private String configName;

    @NotBlank(message = "配置分类不能为空")
    @Size(max = 50, message = "配置分类不能超过50个字符")
    @Schema(description = "配置分类")
    private String configCategory;

    @NotNull(message = "配置类型不能为空")
    @Schema(description = "配置类型（1字符串 2数字 3布尔 4JSON 5文件路径）")
    private Integer configType;

    @Size(max = 500, message = "配置描述不能超过500个字符")
    @Schema(description = "配置描述")
    private String configDesc;

    @Size(max = 1000, message = "默认值不能超过1000个字符")
    @Schema(description = "默认值")
    private String defaultValue;

    @Size(max = 1000, message = "可选值不能超过1000个字符")
    @Schema(description = "可选值（JSON格式）")
    private String optionValues;

    @Size(max = 200, message = "验证规则不能超过200个字符")
    @Schema(description = "验证规则")
    private String validationRule;

    @Schema(description = "是否系统配置（0否 1是）")
    private Boolean isSystem;

    @Schema(description = "是否必填（0否 1是）")
    private Boolean isRequired;

    @Schema(description = "是否启用（0否 1是）")
    private Boolean isEnabled;

    @Schema(description = "是否敏感信息（0否 1是）")
    private Boolean isSensitive;

    @Schema(description = "排序权重")
    private Integer sortWeight;

    @Size(max = 50, message = "配置组不能超过50个字符")
    @Schema(description = "配置组")
    private String configGroup;

    @Size(max = 1000, message = "扩展信息不能超过1000个字符")
    @Schema(description = "扩展信息（JSON格式）")
    private String extraInfo;

    @Size(max = 500, message = "备注不能超过500个字符")
    @Schema(description = "备注")
    private String remark;
} 